package Test;

import java.util.Optional;

/**
 * @author 陈Ser
 * @ClassName User
 * @description: TODO
 * @Date 2021/9/15 16:07
 * @Version 1.0
 */
public class User {
    private String position;
    private Address address;
    private String email;

    public User(String email, String address) {
        this.address = new Address(address);
        this.email = email;
    }

    public Optional<String> getPosition() {
        return Optional.ofNullable(position);
    }

    public Optional<Address> getAddress() {
        return Optional.ofNullable(address);
    }

    public String getEmail() {
        return email;
    }
}

